#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;

/*
    the question ask us to construct an number
    that satisfy three condition below:
    1: n digits
    2: number is not divisble by it's digits
    3: each digit is not equal to 0

    we can make the end of number is 3
    because the number is divided by 3 when the sum of each digit is divided by 3
    so we can make the top digit 2 and other digit 3 to satisfy the condition
*/

void solve(){
    int n;
    cin >> n;
    
    if(n == 1){
        cout << -1 << '\n';
        return;
    }

    for(int i = 1; i <= n; i ++){
        if (i == 1) cout << 2;
        else cout << 3;
    }

    cout << '\n';
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int T;
    cin >> T;
    while(T--){
        solve();
    }


    return 0;
}